package com.java.mapper;

import com.java.pojo.OneMenu;
import com.java.pojo.SysUserBean;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface SysUserBeanMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysUserBean record);

    int insertSelective(SysUserBean record);

    SysUserBean selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserBean record);

    int updateByPrimaryKey(SysUserBean record);

    /**
     *  添加用户信息,并返回主键信息
     * @param map
     * @return
     */
    int addSystemUser(Map map);

    /**
     * 查询所有用户信息
     * @return
     */
    List<Map<String,Object>> selectSystemUserAll();

    /**
     * 修改用户状态
     * @param userId
     * @param flag
     */
    @Select("update system_user set use_status=#{1} where id =#{0}")
    void updateSystemUserStatus(Long userId, String flag);
}